<?php
/**
 * Created by PhpStorm.
 * User: asus
 * Date: 2017/6/15
 * Time: 0:50
 */

namespace Face\Controller;
use Common\Controller\HomebaseController;


class CommonController extends HomebaseController
{
    public function __construct()
    {
        parent::__construct();
        $this->assign('web',M('web')->find(1));
        $this->assign('link',M('links')->where(['link_status'=>1])->select());
        $data = M('city')->where(['pid'=>0])->select();
        foreach ($data as $k=>$v){
            $data[$k]['des'] = M('city')->where(['pid' => $v['id']])->select();
        }

        $this->assign('city',$data);
    }
}